//---------------------------------------------------------------------------

#ifndef unCCTVStateH
#define unCCTVStateH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "AdvGrid.hpp"
#include "AdvMemo.hpp"
#include "AdvObj.hpp"
#include "AdvSmoothLabel.hpp"
#include "BaseGrid.hpp"
#include "TVSLib_OCX.h"
#include <ExtCtrls.hpp>
#include <Grids.hpp>
#include <OleCtrls.hpp>
#include "AdvSmoothButton.hpp"
#include "unCCTVCtrlHolder.h"
#include "unCCTVOpHolder.h"

class TFrm_CCTVMain;
//---------------------------------------------------------------------------
class TFrm_CCTVState : public TForm
{
__published:	// IDE-managed Components
    TTVSLiveControl *tvs;
	TAdvSmoothLabel *AdvSmoothLabel1;
    TPanel *pnlDisplayCtrl;
    TAdvMemo *memoStateLog;
    TAdvStringGrid *sgCCTVList;
    TAdvSmoothButton *btnCCTVCtrl;
    TAdvSmoothButton *btnOpr;
    TLabel *Label1;
    TLabel *labInfoFront;
    TLabel *labelBack;
    TLabel *labInfoBack;
    TLabel *labelPan;
    TLabel *labInfoPan;
    TLabel *labelHeater;
    TLabel *labInfoHeater;
    TLabel *labelLong;
    TLabel *labInfoLong;
    TLabel *labelShort;
    TLabel *labInfoShort;
    TLabel *labelReset;
    TLabel *labInfoReset;
    TLabel *labelResponse;
    TLabel *labInfoResponse;
    TAdvSmoothButton *btnPreset;
    TLabel *labStatusFront;
    TLabel *labStatusBack;
    TLabel *labStatusPan;
    TLabel *labStatusHeater;
    TLabel *labStatusLong;
    TLabel *labStatusShort;
    TLabel *labStatusReset;
    TLabel *labStatusResponse;
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall btnCCTVCtrlClick(TObject *Sender);
    void __fastcall btnOprClick(TObject *Sender);
    void __fastcall sgCCTVListButtonClick(TObject *Sender, int ACol,
          int ARow);
    void __fastcall FormShow(TObject *Sender);
    void __fastcall sgCCTVListClickCell(TObject *Sender, int ARow,
          int ACol);

public:	// User declarations
    TFrm_CCTVCtrlHolder* mCCTVCtrlHolder;
    TFrm_CCTVOpHolder* mCCTVOpHolder;
public:		// User declarations
	__fastcall TFrm_CCTVState(TComponent* Owner);
    inline void __fastcall SetParentFrm(TFrm_CCTVMain* aMainFrm)
    {
        mParentFrm = aMainFrm;
    }
    void __fastcall OpCommandChanged(int aSelectedIndex);
    void __fastcall OpParamChanged(int aSelectedIndex);
    inline int __fastcall SelectedCCTVIndex()
    {
        return mSelectedCCTVIndex;
    }
    inline void __fastcall SelectedCCTVIndex(int aSelectedIndex)
    {
        mSelectedCCTVIndex = aSelectedIndex;
    }
private:
    int mChannelID;
    TFrm_CCTVMain* mParentFrm;
    int mSelectedCCTVIndex;
};
//---------------------------------------------------------------------------
extern PACKAGE TFrm_CCTVState *Frm_CCTVState;
//---------------------------------------------------------------------------
#endif
